#include "Cell.h"

mray::Cell::Cell(){ m_pObject = nullptr; m_next = nullptr; }

mray::Cell::Cell(Collible* pObject){m_pObject = pObject; m_next = nullptr;}

mray::Cell::~Cell(){ if(m_next) delete m_next; }

void mray::Cell::Append(Cell* pCell)
{
	if(m_pObject == nullptr){
		m_pObject = pCell->m_pObject;
		delete pCell;
	}else{
		Cell* temp = this;
		while(temp->m_next) temp = temp->m_next;
		temp->m_next = pCell;
	}
}